<?php
//登录页输出错误提示
function loginShowError($errorMsg = []){
    $htmlstr = '';
    if (!empty($errorMsg)) {
        $htmlstr .= '<div class="alert alert-warning alert-dismissible">';
        $htmlstr .='<button type="button" class="close" data-dismiss="alert">&times;</button>';
        foreach ($errorMsg as $v) {
            $htmlstr .= '<span>'.$v.'</span>'.'！&nbsp;';
        }
        $htmlstr .='</div>';
    }
    return $htmlstr;
}

//忘记密码页输出错误提示
function forgetShowError($errorMsg = []){
    $htmlstr = '';
    if (!empty($errorMsg)) {
        $htmlstr .= '<div class="alert alert-warning alert-dismissible">';
        $htmlstr .='<button type="button" class="close" data-dismiss="alert">&times;</button>';
        foreach ($errorMsg as $v) {
            $htmlstr .= '<span>'.$v.'</span>'.'！&nbsp;';
        }
        $htmlstr .='</div>';
    }
    return $htmlstr;
}

//修改基本信息消息提示
function baseInfoShowTips($tips = [],$col){
    $htmlstr = '';
    if (!empty($tips)) {
        $htmlstr .= '<div class="alert alert-'.$col.' alert-dismissible offset-2 col-8">';
        $htmlstr .='<button type="button" class="close" data-dismiss="alert">&times;</button>';
        foreach ($tips as $v) {
            $htmlstr .= '<span>'.$v.'</span>'.'！&nbsp;';
        }
        $htmlstr .='</div>';
    }
    return $htmlstr;
}

//修改密码消息提示
function pwdInfoShowTips($tips = [],$col){
    $htmlstr = '';
    if (!empty($tips)) {
        $htmlstr .= '<div class="alert alert-'.$col.' alert-dismissible offset-2 col-8">';
        $htmlstr .='<button type="button" class="close" data-dismiss="alert">&times;</button>';
        foreach ($tips as $v) {
            $htmlstr .= '<span>'.$v.'</span>'.'！&nbsp;';
        }
        $htmlstr .='</div>';
    }
    return $htmlstr;
}

//修改头像消息提示
function picInfoShowTips($tips = [],$col){
    $htmlstr = '';
    if (!empty($tips)) {
        $htmlstr .= '<div class="alert alert-'.$col.' alert-dismissible offset-2 col-5">';
        $htmlstr .='<button type="button" class="close" data-dismiss="alert">&times;</button>';
        foreach ($tips as $v) {
            $htmlstr .= '<span>'.$v.'</span>'.'！&nbsp;';
        }
        $htmlstr .='</div>';
    }
    return $htmlstr;
}

//新增用户消息提示
function addUserShowTips($tips = [],$col){
    $htmlstr = '';
    if (!empty($tips)) {
        $htmlstr .= '<div class="alert alert-'.$col.' alert-dismissible offset-2 col-8">';
        $htmlstr .='<button type="button" class="close" data-dismiss="alert">&times;</button>';
        foreach ($tips as $v) {
            $htmlstr .= '<span>'.$v.'</span>'.'！&nbsp;';
        }
        $htmlstr .='</div>';
    }
    return $htmlstr;
}

//修改用户所有信息提示
function editUserShowTips($tips = [],$col){
    $htmlstr = '';
    if (!empty($tips)) {
        $htmlstr .= '<div class="alert alert-'.$col.' alert-dismissible offset-1 col-10">';
        $htmlstr .='<button type="button" class="close" data-dismiss="alert">&times;</button>';
        foreach ($tips as $v) {
            $htmlstr .= '<span>'.$v.'</span>'.'！&nbsp;';
        }
        $htmlstr .='</div>';
    }
    return $htmlstr;
}

//用户列表操作提示
function actionUserShowTips($tip,$col){
    $htmlstr = '';
    if (!empty($tip)) {
        $htmlstr .= '<div class="alert alert-'.$col.' alert-dismissible col-12">';
        $htmlstr .='<button type="button" class="close" data-dismiss="alert">&times;</button>';
        $htmlstr .= '<span>'.$tip.'</span>'.'！';
        $htmlstr .='</div>';
    }
    return $htmlstr;
}

//发送消息提示
function sendMessShowTips($tips = [],$col){
    $htmlstr = '';
    if (!empty($tips)) {
        $htmlstr .= '<div class="alert alert-'.$col.' alert-dismissible">';
        $htmlstr .='<button type="button" class="close" data-dismiss="alert">&times;</button>';
        foreach ($tips as $v) {
            $htmlstr .= '<span>'.$v.'</span>'.'！&nbsp;';
        }
        $htmlstr .='</div>';
    }
    return $htmlstr;
}

//发送消息提示
function actionMessShowTips($tip,$col){
    $htmlstr = '';
    if (!empty($tip)) {
        $htmlstr .= '<div class="alert alert-'.$col.' alert-dismissible col-12">';
        $htmlstr .='<button type="button" class="close" data-dismiss="alert">&times;</button>';
        $htmlstr .= '<span>'.$tip.'</span>'.'！';
        $htmlstr .='</div>';
    }
    return $htmlstr;
}

//详细消息操作提示
function actMessDetailShowTips($tip,$col){
    $htmlstr = '';
    if (!empty($tip)) {
        $htmlstr .= '<div class="alert alert-'.$col.' alert-dismissible offset-1 col-10">';
        $htmlstr .='<button type="button" class="close" data-dismiss="alert">&times;</button>';
        $htmlstr .= '<span>'.$tip.'</span>'.'！';
        $htmlstr .='</div>';
    }
    return $htmlstr;
}
